<template>
  <div class="download-manage-content">
    <svg-icon
      icon-class="download-finish"
      :size="26"
      style="color: #1E8CFF;"
    />
    <div>下载状态更新</div>
    <div
      class="look-more"
      @click="gotoDownloadManage"
    >
      查看
    </div>
  </div>
</template>

<script setup lang="ts">

import { invokeAsyncAPi } from '@/utils/xz-fn'
import { useDownloadManageWindow } from '@/stores/download-manage-window'
import { storeToRefs } from 'pinia'

const downloadManageWindowStore = useDownloadManageWindow()
const { masterWindowId } = storeToRefs(downloadManageWindowStore)

const gotoDownloadManage = async () => {
  await invokeAsyncAPi('fq_NotifyWebMessageEx', masterWindowId.value, 'open-download-manage')
  await invokeAsyncAPi('fq_NotifyWebMessageEx', masterWindowId.value, 'close-download-finish-window')
  invokeAsyncAPi('jsMsg_SetWndStatus', 0)
}
</script>

<style scoped lang="scss">
.download-manage-content{
  position: absolute;
  left:10px;
  right:10px;
  top:50px;
  bottom: 30px;
  font-size:14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Microsoft YaHei, Microsoft YaHei;
  font-weight: 400;
  font-size: 14px;
  color: #39426E;
  gap:10px;
  .look-more{
    position:absolute;
    right:10px;
    font-size: 12px;
    bottom:-10px;
    color:#1E8CFF;
    user-select: none;
    cursor: pointer;
  }
}
</style>